home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / future86.arc / DEMO.TXT next >
Encoding:
Text File  |  1987-04-01  |  21.1 KB  |  625 lines

  1.  
  2.                                 FUTURE86 
  3.                                         tm
  4.                                 ...The language
  5.                                                 
  6.                         Unique in all the World...
  7.  
  8.                       From... DEVELOPMENT ASSOCIATES
  9.                                   1520 S Lyon 
  10.                               Santa Ana, CA 92705
  11.                                 (714) 835 9512
  12.                            Compuserve 71460,1146
  13.  
  14.                  Copyright (C) 1987 by Development Associates
  15.                                     and
  16.                                RIGY Corporation
  17.  
  18.                              All rights reserved
  19.  
  20.     This FUTURE86 demonstration diskette is an actual application example.
  21.  
  22.     This diskette contains several files:
  23.  
  24.     DRIVER.FIF....source file for the demo program
  25.     DRIVER.COM....execution or runtime file for the demo
  26.                   produced by the FUTURE86 compiler, FUT86.COM
  27.     DRIVER.LST....listing file produced via the compiler
  28.     DRIVER.SYM....Symbol file produced by the compiler
  29.     DRIVER.ERR....Error file produced by the compiler
  30.                   (this file is empty...because there are no errors)
  31.  
  32.     DEMO.TXT....the actual text you are now viewing comes from this file
  33.  
  34.     SCRIPT.SCR....This is an output control file that contains coded
  35.                   character strings that control the formatting,
  36.                   attributes, placement, speed and other parameters
  37.                   of the text you are now viewing.
  38.  
  39.     This demonstration program furnishes information about 
  40.     FUTURE86 using actual FUTURE86 generated code. Further, you
  41.     can look at the source code and listings, observe the code 
  42.     compactness and see the many advantages that FUTURE86 
  43.     offers you.
  44.  
  45.     Welcome to FUTURE86 the world class programming environment 
  46.     that truly belongs to the future...  
  47.  
  48.     FUTURE86 runs under MS\DOS, on IBM PC,AT or compatibles and
  49.     generates compact executable object programs and highly readable 
  50.     compilation lists with a minimum of programming effort.
  51.  
  52.     FUTURE86 is a variable level language that compiles directly
  53.     to machine code. 
  54.  
  55.     The language is inherently rommable, reentrant and recursive.
  56.  
  57.     Unique among existing languages, you may freely mix assembly 
  58.     language and high level statements within procedures.
  59.  
  60.     FUTURE86 is an "environment natural" language. You are free 
  61.     to choose procedure names that relate to your application 
  62.     needs. Additionally, FUTURE86 is extensible, allowing you 
  63.     to extend the language into one that is application specific.
  64.  
  65.     FUTURE86 program listings produce highly readable code
  66.     both at high and low levels. This is especially valuable
  67.     when debugging real time control applications.
  68.  
  69.     Writing programs in FUTURE86 is intuitively much easier 
  70.     than with other languages because its syntax is so simple,
  71.     consisting of just tokens and spaces. FUTURE86 compilation 
  72.     is almost trivial.
  73.  
  74.     You can concentrate on developing your algorithms instead 
  75.     of being involved in detailed syntax requirements. 
  76.  
  77.     FUTURE86's fast, two pass compiler, inherently supports:
  78.  
  79.      ** structured programs 
  80.      ** forward referencing 
  81.      ** XENIX-like file access 
  82.      ** MS\DOS INT processes 
  83.      ** software and 8087 floating point 
  84.      ** application romming 
  85.      ** arrays 
  86.      ** .COM or .HEX files 
  87.      ** interrupt driven architectures.
  88.      ** conditional compilation and linkage
  89.      ** "include" files
  90.      ** 8086/88 and 80186/8 instructions.
  91.      ** high level listings that detail the object level
  92.      ** high level direct register access
  93.  
  94.     Full support is provided for local and global labels and named 
  95.     procedures. In addition to increasing code readability, this 
  96.     feature allows full symbolic debugging.
  97.  
  98.     An important part of the FUTURE86 environment is the integrated,
  99.     variable level debugging module, FDT86. This module allows 
  100.     debugging at either machine or high levels in a symbolic,
  101.     interactive way. 
  102.  
  103.     FUTURE86 generated code is fast making it suitable for 
  104.     real time control applications. It is also ideal for 
  105.     applications such as AI, CASE, expert systems, business, 
  106.     engineering analysis, modeling, etc.. 
  107.  
  108.     FUTURE86 has the following inherent properties:
  109.  
  110.     * Naturally "structured" 
  111.  
  112.     * Debugging resources integrated into programming environment.
  113.  
  114.     * Produces compact code.
  115.  
  116.     * Extensible. You actually enlarge the language for your
  117.       application.
  118.  
  119.     * Run time or size optimizing is completely under your control
  120.  
  121.     * Write code at either an arbitrarily abstract high level or 
  122.       in assembly language within the same procedure depending on 
  123.       your needs with no complex context switching. High and low 
  124.       level expressions can be freely mixed. 
  125.  
  126.     * FUTURE86 is fast. No runtime interpreters like BASIC, 
  127.       FORTH or LISP.   
  128.  
  129. ***Its easy to see why FUTURE86 obsoletes other programming languages***    
  130.  
  131.     Anyone can learn FUTURE86 quickly because of its remarkably 
  132.                    simple and logical concepts.
  133.  
  134.     FUTURE86 is a mature World Class language with thousands of users,
  135.     hard at work in many diverse applications...
  136.  
  137.     and it is still being extended...
  138.  
  139.   In addition to a complete set of low level assembler instructions 
  140.   and compiler directives, FUTURE86 supplies hundreds of powerful, 
  141.   natural language, extensible, high level procedures that give you 
  142.   programming power unmatched by other languages.
  143.  
  144.                  FUTURE86 puts you in command! 
  145.  
  146.      You can customize FUTURE86 to minimize the size of your 
  147.      application's .COM files and make MS\DOS environment 
  148.      independent applications such as ROM/RAM based systems. 
  149.      You can also extend FUTURE86. 
  150.  
  151.      FUTURE86 will revise your thinking about what constitutes a 
  152.      modern programming language.  Instead of a complex, difficult to
  153.      understand language, FUTURE86 is elegantly simple. 
  154.  
  155.     Programs in FUTURE86 are expressed as a collection of tokens, each
  156.     of which represent a procedure that the computer sequentially
  157.     executes. 
  158.  
  159.     These tokens can be referred to as "words" and they include the
  160.     hundreds supplied with FUTURE86 and the ones you will create in
  161.     writing your program or application. 
  162.  
  163.     A FUTURE86 word is written as follows:
  164.  
  165.     : NAME  processa porcessb processc ....  ;
  166.  
  167.     The colon starts a word definition.
  168.  
  169.     NAME is the name of the procedure such as BANANA, GORILLA, SORT, etc. 
  170.     You can choose names that relate to your needs.
  171.  
  172.     Processa, processb, etc.. are the names of previously defined 
  173.     (although FUTURE86 allows forward referencing ) FUTURE86 words 
  174.     that are to be sequentially executed.  
  175.  
  176.     The last portion of the definition is the semicolon which signals 
  177.     the compiler that the definition is now complete.
  178.  
  179.     FUTURE86 source files have a .FIF extension which is 
  180.     symbolic for "FUTURE INFORMATION FILE".
  181.  
  182.     Your source program can be this simple:
  183.  
  184.    : SEE_COUNT  10 DO I 48 + CO LOOP ;
  185.  
  186.    END SEE_COUNT<cr>
  187.  
  188.    After this source program has been compiled by the FUTURE86
  189.    compiler, and the resulting .COM file executed, the screen will
  190.    display:
  191.  
  192.    0123456789
  193.  
  194.    and then return to the MS\DOS prompt.
  195.  
  196.    The compilation procedure used is:
  197.  
  198.    FUT86 COUNT KERNEL
  199.  
  200.    Where FUT86 is the FUTURE86 compiler, COUNT is our program's 
  201.    name and KERNEL is the file that contains the high level 
  202.    FUTURE86 words that we are referencing in our program.
  203.  
  204.    Let us now explore the details of the source program.
  205.  
  206.    First, we have the definition itself that starts with a colon 
  207.    to signal the compiler that we are now defining a high level 
  208.    procedure. 
  209.  
  210.    Then, the name of the procedure, SEE_COUNT (we are free to use 
  211.    any names for procedures) is placed and is followed by the 
  212.    procedures which are:
  213.  
  214.    10---number of times (decimal) we wish the loop construct to 
  215.         execute.
  216.  
  217.    DO---start of the loop construct
  218.  
  219.    I---places the loop index or the loop count value on the
  220.        top of the data stack.
  221.  
  222.    48--number 48 (decimal) is placed on top of the data stack. 
  223.        This is used to convert the loop number to an ASCII value
  224.        suitable for outputing to the screen.
  225.  
  226.    +---top two numbers on the data stack are added together to
  227.        form the desired ASCII digits value. Note: this is RPN 
  228.        notation. FUTURE86 generally employs this type of number 
  229.        manipulation. 
  230.  
  231.    CO--top of data stack value (an ASCII value) is sent to the
  232.        output device. This procedure means "console out".
  233.  
  234.    LOOP--end statement of the loop construct. The procedure 
  235.          exits this point after reaching a loop count of one
  236.          less than the loop index (the 10). The count therefore
  237.          starts at 0.
  238.  
  239.    ;---signal to the compiler that we have now completed our
  240.        high level FUTURE86 definition.
  241.  
  242.    END is a required statement at the conclusion of every FUTURE86 
  243.    source file. 
  244.  
  245.    FUTURE86 provides you with a set of basic tools (procedures)
  246.    and its compiler has the important responsibility of correctly 
  247.    compiling your source programs that are built with these tools.
  248.  
  249.    FUTURE86 also has the responsibility of providing you with a
  250.    complete and powerful debugging resource that allows you to
  251.    completely debug your algorithms.
  252.  
  253.    Because FUTURE86 source syntax is so simple, compilation is 
  254.    almost a trivial matter. This is usually a major problem in 
  255.    most other languages.
  256.  
  257.    FUTURE86 language syntax and internal structure encourage
  258.    program modularization. Achieving structured programs is 
  259.    straightforward without being restrictive and eliminates
  260.    the "GOTO" concept that can make program reading and 
  261.    maintenance so difficult. This is an important
  262.    characteristic of a powerful programming language.
  263.  
  264.    FUTURE86 contains a rich set of string procedures. 
  265.    FUTURE86 exploits a concept of string parameters
  266.    that is unique to FUTURE86 and is not found in other 
  267.    languages. This will make your programs much more powerful.
  268.  
  269.    This short core dump program should give you some insite 
  270.    as to the simplicity and power that FUTURE86 can give you. 
  271.  
  272.    : DUMP_1LINE            \address, count --- outputline
  273.         OVER SWAW PRW      \display line seg. addr 
  274.         ':' CO             \output colon
  275.         OVER PRW
  276.         2 SPACES          \output 2 spaces
  277.         BEGIN
  278.            CGET PRB       \get 1 byte and output it in hex
  279.            SPACE         \output a space
  280.            ?NULL         \is string access finished?
  281.         UNTIL            \go back to BEGIN till finished
  282.         CRLF  ;          \output a cr and lf
  283.  
  284.    : DUMP                \address, count --- outputrange
  285.       BEGIN
  286.         16 SSPLIT       \get 16 bytes from memory
  287.         DUMP_1LINE      \output one line of data 
  288.         ?NULL           \are we done?
  289.       UNTIL ;
  290.    Labels are an important FUTURE86 resource.
  291.  
  292.    Labeled procedure names, when properly selected, convey   
  293.    information about the procedure that the label references. 
  294.    The use of labels in your source code enable symbolic debugging.
  295.  
  296.    FUTURE86 produces highly readable compilation listings that are 
  297.    tightly coupled to the machine level. You can read the high 
  298.    level coding with its abstract and application oriented syntax 
  299.    for maximum comprehension and at the same time the code generated 
  300.    can be tracked down to its actual byte level roots.
  301.  
  302.    Lets see what the following code example produces.
  303.  
  304.    ESCAPE      EQU         1BH
  305.  
  306.    : PRINTMODE
  307.         ESCAPE
  308.          2
  309.       DO
  310.         LO
  311.       LOOP 
  312.         ;
  313.  
  314.    When this source code is compiled the listing becomes:
  315.  
  316.    1B80/                  : PRINTMODE
  317.    1B80/E8A3E5 1B                ESCAPE
  318.    1B84/E89FE5 02                  2
  319.    1B88/E82AE6               DO
  320.    1B8B/E8CBF5                     LO
  321.    1B8E/E833E6 E9F7FF        LOOP 
  322.    1B94/C3                          ;
  323.  
  324.    If this code is carefully disassembled, we will see something like:
  325.  
  326.    1B80    E8A3E5  CALL 0126       \CONSTANT PROCEDURE
  327.    1B83    1B                      \ASCII CONSTANT--ESCAPE
  328.    1B84    E89FE5  CALL 0126       \CALL CONSTANT PROCEDURE AGAIN
  329.    1B87    02                      \THE CONSTANT
  330.    1B88    E82AE6  CALL 01B5       \CALL THE DO PROCEDURE
  331.    1B8B    E8CBF5  CALL 1159       \CALL THE LO PROCEDURE
  332.    1B8E    E833E6  CALL 01C4       \CALL THE LOOP PROCEDURE
  333.    1B91    E9F7FF  JMP  1B8B       \IF MORE LOOPS REQUIRED JMP BACK
  334.    1B94    C3      RET             \PROCEDURE IS FINISHED--RETURN
  335.   
  336.    As you can see, most FUTURE86 high level words function as 
  337.    machine code subroutines. The expansion of a FUTURE86 procedure
  338.    can be viewed as a series of CALL instructions to other defined 
  339.    procedures. Simplicity is elegance.
  340.  
  341.    FUTURE86 provides complete flow control procedures including:
  342.  
  343.    IF(-IF)..ELSE..THEN
  344.  
  345.    BEGIN..UNTIL
  346.  
  347.    CASE..ENDCASE
  348.  
  349.    SELECT..ENDSELECT
  350.  
  351.    BEGIN..IF(-IF)..REPEAT
  352.  
  353.    DO..LOOP
  354.  
  355.    BEGIN..BREAK..UNTIL
  356.  
  357.    BEGIN...AGAIN
  358.  
  359.    The FUTURE86 assembler can be used to generate named procedures
  360.    in a manner similar to high level FUTURE86. 
  361.  
  362.    For example, THE FUTURE86 procedure, ROT, that rotates the third
  363.    stack element to the top of the data stack is written completely
  364.    in assembler as follows:
  365.  
  366.         : ROT
  367.                 \LOW WORD\
  368.                 LDS AX,[BP]
  369.                 XCHG AX,[BP + 4]
  370.                 XCHG AX,[BP + 8]
  371.                 MOV [BP],AX
  372.                 \HI WORD\
  373.                 MOV AX,DS
  374.                 XCHG AX,[BP + 6]
  375.                 XCHG AX,[BP + 10]
  376.                 MOV [BP + 2],AX  ;
  377.  
  378.    Writing in FUTURE86 assembly language is almost exactly the 
  379.    same as writing in high level FUTURE86. 
  380.  
  381.    In fact, you can directly intermix assembly language and 
  382.    high level FUTURE86 within the same procedure with no 
  383.    restrictions. 
  384.  
  385.    :MIXED                          \MIXED HIGH/LOW LEVEL PROCEDURES
  386.            MOV AH,3                \OPERATION TYPE
  387.            MOV BH,BYTE CS:PAGE#    \SELECT PAGE NO.
  388.            IVDOS                   \VIDEO BIOS--HIGH LEVEL
  389.            CMP DH,23               \ROW LIMIT?
  390.            JL  _OUTPUT             \COND. JMP TO LOCAL LABEL
  391.            SCROLL_UP_ONE_LINE      \HI-LEVEL SCROLL
  392.            22 0 PUT_CURS           \ADJ CURS POS
  393.    _OUTPUT:  
  394.            WRITE_ATR               \PUT CHAR ATTR
  395.            CO  ;                   \WRITE THE CHAR AND END
  396.  
  397.    FUTURE86 has complete provision for macros. 
  398.  
  399.         CODEMACRO macroname
  400.                 assembly statement
  401.                 assembly statement
  402.                        |
  403.                        |
  404.                        |
  405.                 assembly statement
  406.         ENDM
  407.  
  408.  
  409.    FUTURE86 provides for decimal, binary, and hex number bases
  410.    and for character and character string constants.
  411.  
  412.    FUTURE86 provides a simple mechanism for conditional 
  413.    compilation of source programs via use of the 
  414.    word [CC :
  415.  
  416.    [CC     formula
  417.  
  418.    ..FUTURE86 routine
  419.  
  420.    CC]
  421.  
  422.    FUTURE86 code is very readable. For example, the following 
  423.    sequence:
  424.  
  425.    START 3 TURN_RIGHT PICK STOP
  426.  
  427.    relates to the driving program for a robotic application and
  428.    expresses the starting motion, turning clock-wise by three steps,
  429.    pick up an item and then stop. A natural syntax for FUTURE86. 
  430.  
  431.    The FUTURE86 debugger (FDT86) provides an interactive debugger 
  432.    for testing your FUTURE86 programs in a fast, efficient manner.
  433.  
  434.    FDT86 is also very useful for program prototyping and as a FUTURE86
  435.    learning environment.
  436.  
  437.    FDT86 has a complete symbolic, interactive environment to give you 
  438.    the power you need. 
  439.  
  440.    You can execute any words that are resident, set and execute
  441.    breakpoints, investigate procedure stack behavior, define 
  442.    and execute new FUTURE86 words and perform other useful 
  443.    debugging tasks such as examine ports, memory, etc.. 
  444.  
  445.    These FDT86 commands are available:
  446.  
  447.    A -- Change map/set arguments      C -- Call subroutine
  448.    D -- Dump memory                   E -- Erase FDT generated definitions
  449.    F -- Fill/FUTURE mode              G -- Go execute user program
  450.    H -- 16 bit add/subtract           L -- reList FDT generated definitions
  451.    M -- Move memory block             O -- Set origin address
  452.    P -- Display parameter stack       Q -- Quit
  453.    QC -- Quit and stay resident       R -- Read file
  454.    S -- Change memory (byte)          U -- Upload program/data/source code
  455.    V -- Display label value           W -- Change memory (word)
  456.    X -- Change register               Z -- Display program position information
  457.    .. -- retain data stack info       da-- down arrow. Repeat last command.
  458.    _  -- set break point at addr or label
  459.  
  460.    Other -- Any available high level FUTURE86 procedures.
  461.  
  462.    The FDT86 environment is also excellent for developing
  463.    simple utility words or procedures since you can 
  464.    easily save your work, in the form of source code.
  465.  
  466.    The ability to execute virtually any FUTURE86 words
  467.    from within FDT86 in an immediate environment is 
  468.    very powerful.
  469.  
  470.    Additionally, the high level breakpoint resources 
  471.    allow you to really focus on performance details of 
  472.    any portion of your program.
  473.  
  474.    Executing and debugging your application code that was 
  475.    compiled with the FUTURE86 compiler FDT86 offers powerful 
  476.    debugging resources, both at high and low levels. This
  477.    capability will really help you successfully debug
  478.    your applications in an efficient manner. 
  479.  
  480.    More than 250 pages of documentation are furnished with 
  481.    FUTURE86 which includes a detailed description of the language,
  482.    programming techniques, and complete procedure glossaries
  483.    that enable you to quickly learn and become proficient at
  484.    writing successful programs. The manual includes the
  485.    following sections:
  486.  
  487.               PART I...FUTURE86 RESOURCES, LANGUAGE AND COMPILER
  488.  
  489.        INTRODUCTION
  490.  
  491.        FUTURE86 ADVANTAGES
  492.  
  493.        FUTURE86 RESOURCES
  494.             FUTURE86 COMPILER/ASSEMBLER (FUT86)
  495.             FUTURE86 DEBUGGER (FDT86)
  496.             OTHER FILES
  497.  
  498.        THE FIRST THING TO DO
  499.  
  500.        MAKING WORKING SYSTEM FILES
  501.  
  502.        RAM DISK OPERATION
  503.  
  504.        STARTING FUTURE86 
  505.  
  506.        FUTURE86 COMPILER 
  507.           COMPILER MESSAGES
  508.           COMPILER ERROR MESSAGES
  509.  
  510.           KERNEL COMPILATION
  511.  
  512.        PROGRAM EXECUTION EXAMPLE
  513.  
  514.        FUTURE86, THE LANGUAGE
  515.  
  516.        LIST FILE PRINTING  
  517.  
  518.        D CHARTS-STRUCTURED FLOW CHARTS 
  519.  
  520.        PROGRAM WRITING STYLE
  521.  
  522.        FUTURE86 STRING PROCESSING
  523.  
  524.        LABELS
  525.  
  526.        LINKAGE MECHANISM
  527.  
  528.        REVERSE POLISH NOTATION AND STACKS
  529.            DATA STACK
  530.            RETURN STACK
  531.  
  532.        OBJECT READABILITY
  533.  
  534.        STACK PROCESSING
  535.  
  536.        BRANCHING--FLOW CONTROL
  537.  
  538.        ARRAYS
  539.  
  540.        SOURCE PROGRAM STRUCTURE
  541.  
  542.        PSEUDO INSTRUCTIONS
  543.  
  544.        FUTURE86 ASSEMBLER
  545.            STRUCTURE
  546.            MIXING ASSEMBLER AND HIGH LEVEL CODE
  547.            MACROS
  548.            EXAMPLES
  549.  
  550.        WHEN TO USE ASSEMBLY PROCEDURES
  551.  
  552.        FUTURE86 NUMBER PROCESSING
  553.            CHARACTER CONSTANTS
  554.            CHARACTER STRING CONSTANTS
  555.            SPECIAL CHARACTER CONSTANT RESOURCE
  556.            PROGRAM AND DATA LOCATIONS
  557.            COMPUTATION SEQUENCE--ASSEMBLER
  558.            COMPUTATION SEQUENCE--HIGH LEVEL FUTURE86
  559.  
  560.        ROM APPLICATIONS
  561.  
  562.        CONDITIONAL COMPILATION
  563.  
  564.        SOURCE READABILITY AND CODING STYLE
  565.           
  566.        PROCEDURE NAME ALIASING
  567.  
  568.        DIRECT REGISTER ACCESS WORDS
  569.  
  570.                       PART II...FDT86--FUTURE86 DEBUGGER
  571.  
  572.        FDT86 DEBUGGER 
  573.  
  574.        ASSEMBLER MODE COMMANDS
  575.  
  576.        FUTURE MODE DEBUG ENVIRONMENT
  577.  
  578.        FDT HIGH LEVEL BREAKPOINTS
  579.  
  580.        FDT ALIASING PROPERTIES
  581.  
  582.        FDT ERROR MESSAGES
  583.  
  584.        USING FDT FOR YOUR PROGRAM DEVELOPMENT
  585.  
  586.                      PART III...FUTURE86 GLOSSARY
  587.  
  588.                      PART IV...SYSTEM GLOSSARY
  589.  
  590.        APPENDICES 
  591.       
  592.        FUTURE86 QUICK REFERENCE GUIDE
  593.  
  594.    A complete FUTURE86 environment consists of the compiler, kernel 
  595.    library, FDT86, a text editor, specialized printing utility and 
  596.    various demo and utility files. Documentation consists of a 
  597.    comprehensive tutorial style manual complete with procedure glossaries.
  598.  
  599.    Optional libraries available include: Software and 8087 
  600.    floating point, RS-232, Modem and GENHEX, a .COM to Intel
  601.    Hex file converter.
  602.  
  603.               This demonstration can only give you a 
  604.                    brief sense of the power
  605.                 that awaits you within FUTURE86...
  606.  
  607.    Thank you for using this demo...
  608.  
  609.    If you are serious about software development
  610.    shouldn't you be using FUTURE86 ?
  611.  
  612.    FUTURE86 is a fully supported professional language intended 
  613.    for serious applications.
  614.  
  615.    To order or for additional information
  616.    write or call:
  617.  
  618.    DEVELOPMENT ASSOCIATES
  619.    1520 S Lyon
  620.    Santa Ana, CA. 92705 USA
  621.    (714) 835 9512
  622.  
  623.    Do it today....and brighten your future!
  624.  
  625.